package com.netease.pop.sdk.request;

import java.util.HashMap;
import java.util.Map;

import com.netease.pop.sdk.FileItem;
import com.netease.pop.sdk.KopUploadRequest;
import com.netease.pop.sdk.response.ItemImgUploadResponse;

public class ItemImgUploadRequest implements KopUploadRequest<ItemImgUploadResponse> {

	private FileItem image;
	
	@Override
	public String getApiMethodName() {
		return "kaola.item.img.upload";
	}

	@Override
	public Map<String, String> getTextParams() {
		return null;
	}

	@Override
	public Long getTimestamp() {
		return System.currentTimeMillis();
	}

	@Override
	public void setTimestamp(Long timestamp) {
		
	}

	@Override
	public Class<ItemImgUploadResponse> getResponseClass() {
		return ItemImgUploadResponse.class;
	}
	public ItemImgUploadRequest( ) {
	}
	
	public ItemImgUploadRequest(FileItem image) {
		super();
		this.image = image;
	}

	@Override
	public Map<String, FileItem> getFileParams() {
		Map<String, FileItem> map = new HashMap<String, FileItem>();
		map.put("pic", image);
		return map;
	}

}
